package com.dhcc.bpm.modules.api.service.impl;

import com.dhcc.bpm.modules.api.entity.Api;
import com.dhcc.bpm.modules.api.entity.IssueApi;
import com.dhcc.bpm.modules.api.mapper.IssueApiMapper;
import com.dhcc.bpm.modules.api.service.IIssueApiService;
import com.dhcc.bpm.modules.api.vo.IssueApiVO;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.List;

/**
 * @ClassName IssueApiServiceImpl
 * @Description api发布表 服务实现类
 * @Author daina
 * @Date 2020/2/25 15:22
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 */
@Service("opc_issue_api")
public class IssueApiServiceImpl extends BaseServiceImpl<IssueApiMapper, IssueApi> implements IIssueApiService {

	@Autowired
	IssueApiMapper issueApiMapper;

	@Override
	public IPage<IssueApiVO> selectIssueApiPage(IPage<IssueApiVO> page, IssueApiVO issueApi) {
		return page.setRecords(baseMapper.selectIssueApiPage(page, issueApi));
	}

	@Override
	public List<Api> selectApisById(Long id) {
		return issueApiMapper.selectApisById(id);
	}

	@Override
	public List<IssueApi> selectByCondition(IssueApi issueApi) {
		return issueApiMapper.selectByCondition(issueApi);
	}

	@Override
	public int updateStatus(Long id) {
		return issueApiMapper.updateStatus(id);
	}

	@Override
	public int insert(IssueApi issueApi) {
		return issueApiMapper.insert(issueApi);
	}

	@Override
	public IssueApi getIssueApiById(Long busNo) {
		return issueApiMapper.getIssueApiById(busNo);
	}

	@Override
	public IssueApi selectByApiId(Long busNo) {
		return issueApiMapper.selectByApiId(busNo);
	}

    @Override
    public Integer deleteById(Long busNo) {
        return issueApiMapper.deleteById(busNo);
    }
}
